package com.dandandog.framework.faces.scope;

import org.springframework.stereotype.Component;

import javax.faces.context.FacesContext;
import java.util.Map;


/**
 * @author JohnnyLiu
 */
@Component("viewScope")
public class ViewScope extends AbstractScope {

    @Override
    protected Map<String, Object> getSource() {
        return FacesContext.getCurrentInstance().getViewRoot().getViewMap();
    }
}
